#include <stdio.h>

int main(int argc,char *argv[])
{
	int a = 1000;//a为本金
	float r1=0.0036,r2=0.0225,r3=0.0198;
	//r1为活期年利率，r2为定期年利率，r3为半年的年利率
	float b,c,d,e;//b为活期利息，c为一年定期利息，d为上半年利息,e为下半年的利息
	float x,y,z;//x为活期的本息和，y一年定期的本息和，z为2次半年的本息和
	/*
	b = a * 1 * r1;//利息=本金*年数*年利率
	c = a * 1 * r2;
	d = a * 0.5 * r3;
	e = (a + d) * 0.5 * r3;
	x = a + b;
	y = a + c;
	z = a + e + d;
	*/
	x = a * (1 + r1);
	y = a * (1 + r2);
	z = a * (1 + r3 /2 ) * (1 + r3 / 2);
	
	printf("x = %.4f\n",x);
	printf("y = %.4f\n",y);
	printf("z = %.4f\n",z);
	
	return 0;
}